<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
		<title>Highcharts Example</title>


		<!-- 1. Add these JavaScript inclusions in the head of your page -->
		<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"></script>
		<%= javascript_include_tag "highcharts" %>
		<!--[if IE]>
			<script type="text/javascript" src="../js/excanvas.compiled.js"></script>
		<![endif]-->


		<!-- 2. Add the JavaScript to initialize the chart on document ready -->
		<script type="text/javascript">
		$(document).ready(function() {
			var chart = new Highcharts.Chart({
				chart: {
					renderTo: 'container',
					defaultSeriesType: 'areaspline'
				},
				title: {
					text: 'Positivity Rating to Article Question'
				},
				legend: {
					layout: 'vertical',
					style: {
						position: 'absolute',
						bottom: 'auto',
						left: '150px',
						top: '100px'
					},
					borderWidth: 1,
					backgroundColor: '#FFFFFF'
				},
				xAxis: {
					categories: [
						'0',
						'1',
						'2',
						'3',
						'4',
						'5',
						'6',
                                                '7',
                                                '8',
                                                '9',
                                                '10'
					]//,
					//plotBands: [{ // visualize the weekend
					//	from: 4.5,
					//	to: 6.5,
					//	color: 'rgba(68, 170, 213, .2)'
					//}]
				},
				yAxis: {
					title: {
						text: 'No. of Annotations'
					}
				},
				tooltip: {
					formatter: function() {
			                return '<b>'+ this.series.name +'</b><br/>'+
							this.x +': '+ this.y +' Annotations';
					}
				},
				credits: {
					enabled: false
				},
				plotOptions: {
					areaspline: {
						fillOpacity: 0.8
					}
				},
				series: [{
					name: 'Points',
					data: [
                                                  <%@annotation_amt.each do |x|%>
                                                   <%=x%>,
                                                   
                                                  <%end%> ]
				}//, {
                                  //	name: 'Jane',
                                  //	data: [1, 3, 4, 3, 3, 5, 4]
				//}

                            ]
			});


		});
		</script>

	</head>
	<body>

		<!-- 3. Add the container -->
		<div id="container" style="width: 800px; height: 400px; margin: 0 auto"></div>


	</body>
</html>
